	
var captain = localStorage.getItem("captain");
var issignNum = localStorage.getItem("issignNum");
var rc = localStorage.getItem("rc");
console.log('rc：'+rc); 
console.log('issignNum:'+issignNum); 
if(issignNum == 'true'){
	hui("#footSign").show();
	hui("#footSignNo").hide();
}else{
	if(rc == 1){
		hui("#footSign").show();
		hui("#footSignNo").hide();
	}else{
		hui("#footSign").hide(); 
		hui("#footSignNo").show();
	}
}

function getdoctorsbygroupid(){
	hui.ajax({
	    type : 'POST',
	    url : globleobj['domain']+'/comhospital/getdoctorsbygroupid',
	    data : {'group_id':JSON.parse(captain)._id},
	    beforeSend : function(){hui.loading();},
	    complete   : function(){hui.closeLoading();},
	    success : function(msg){
	    	console.log('getdoctorsbygroupid'+msg) 
	    	var data = JSON.parse(msg);
	    	if(data.rc != 0){
	    		hui.toast(data.msg); 
	    		return false; 
	    	}
	    	
	    	hui(".teamTitle").html(JSON.parse(captain).title);
	    	hui(".teamName").html(JSON.parse(captain).name);
	    	hui(".teamDepart").html(JSON.parse(captain).depart);
	    	hui(".teamhosName").html(JSON.parse(captain).hos_name);
	    	hui(".teamCount").html(data.count);
	    	hui(".teamContent").html(JSON.parse(captain).content);
	    	hui(".teamSigneds").html(JSON.parse(captain).signeds);
			    	//跳转团队
			hui('#goteamInfo').click(function(){
				localStorage.setItem("captainList",JSON.stringify(data.list));
			    hui.open('/html/helthy/teamDetailInfo.html',{},true);
			});
			
	    	
	    },
	    error : function(e){
	        console.log(JSON.stringify(e));
	        hui.iconToast('读取消息失败', 'warn');
	    } 
	}); 
}
hui.ready(function(){
	getdoctorsbygroupid()
	hui('#hui-back').click(function(){
//	    hui.toast('返回');
	});
	
	
	//跳转聊天
	hui('.zixun').click(function(){
	    hui.open('/html/imChat.html',{},true);
	});
	//跳转签约
	hui('.goSign').click(function(){
	    hui.open('/html/helthy/sign.html',{},true);
	});
});